﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Collections;
using Microsoft.Reporting.WinForms;

namespace CDCWnd
{
    public partial class frmReport : Form
    {
        public frmReport()
        {
            InitializeComponent();
        }

        private void frmReport_Load(object sender, EventArgs e)
        {

            this.rptObj.RefreshReport();
        }
        public MemoryStream ReportDefinition;
        public IEnumerable ReportData;
        public void Initialize()
        {
            this.rptObj.Reset();
            this.rptObj.LocalReport.LoadReportDefinition(ReportDefinition);
            this.rptObj.LocalReport.DataSources.Add(new ReportDataSource("MyData", ReportData));
            this.rptObj.RefreshReport();
        }
    }
}
